# print("3-2-01zuoye.py")
# from pprint import pprint
# pprint(dir(__builtins__))
# >>> float("1.0")
# 1.0
# >>> float(1)
# 1.0
# >>> float('1')
# # 1.0
# list('1')
# ['1']
# tuple("qwe")
# ('q', 'w', 'e')
# >>> tuple([1,2])
# (1, 2)dict(e=2)
# {'e': 2}
# ww={'e': 2}
# ww
# {'e': 2}
# dir(None)
# ['__bool__', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__']
# dict(a=1)
#
# >>> r = range(100)
# >>> r
# range(0, 100)
#
# >>> for i in range(10):
# ...     print(i)
# >>> def foo(a, b):
# ...     return a*2, b*2
# ...
# >>> result = foo(1, 2)
# >>> result
# (2, 4)
# def doo(a,b):
# ...     return a*2,b*3,3
# ...
# d=foo(1,2)
# d
# (2, 6)
# d2=doo(1,2)
# d
# (2, 6)
# d2
# (2, 6, 3)
# def doo():
#     return 1,2,3,4,5
# a,*b,c,d=(1,2,3,4,5,6,7,8,9)
# a
# 1
# b
# [2, 3, 4, 5, 6, 7]
# c
# 8
# d
# >>> a,b = foo(1,2)
# >>> a
# 2
# >>> b
# 4
# # 等同于
# >>> result = foo(1,2)
# >>> a, b = result
# l
# [[1, 'a'], [2, 'b'], [6, 'c'], [3, 'd']]
# l.sort(key=lambda x:x[0])
# l
# [[1, 'a'], [2, 'b'], [3, 'd'], [6, 'c']]

# def my_powser_2(a):
# 	return a ** 2
#
# # 匿名函数只是图方便, 所有的匿名都可以通过正常函数替换
# >>> m = map(my_powser_2, [1,2,3])
# >>> list(m)
# [1, 4, 9]

def fact(n):#阶乘
    if n == 1:
        return 1
    return n * fact(n-1)
print(fact(4))






